Skip to content

Rollup of 6 pull requests#156678

Closed
JonathanBrouwer wants to merge 18 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-dIoBRAb
Closed

Rollup of 6 pull requests#156678
JonathanBrouwer wants to merge 18 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-dIoBRAb

Conversation

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

Successful merges:

r? @ghost

Create a similar rollup

bjorn3 and others added 18 commits May 5, 2026 17:33
In the future this can be used by build-std, but until then it is still
useful for allowing rust-analyzer to work offline.

This increases the unpacked size by 24MB (from 116MB to 140MB) and the
compressed size by only 2MB (from 18MB to 20MB)
Add support for inline assembly for the amdgpu backend (the
amdgcn-amd-amdhsa target).
Add register classes for `vgpr` (vector general purpose register) and
`sgpr` (scalar general purpose register).
The LLVM backend supports two more classes, `reg`, which is either VGPR
or SGPR, up to the compiler to decide. As instructions often rely on a
register being either a VGPR or SGPR for the assembly to be valid, reg
doesn’t seem that useful (I struggled to write correct tests for it), so
I didn’t end up adding it.
The fourth register class is AGPRs, which only exist on some hardware
versions (not the consumer ones) and they have restricted ways to write
and read from them, which makes it hard to write a Rust variable into
them. They could be used inside assembly blocks, but I didn’t add them
as Rust register class.

There is one change affecting general inline assembly code, that is
`InlineAsmReg::name()` now returns a `Cow` instead of a `&'static str`.
Because amdgpu has many registers, 256 VGPRs plus combinations of 2 or 4
VGPRs, and I didn’t want to list hundreds of static strings, the amdgpu
reg stores the register number(s) and a non-static String is generated
at runtime for the register name.
Use just two variants for SGPRs and VGPRs, each with an int for the
register size in bits.
Remove support for 64-bit vector types to make it simpler.
The documentation for the `format_into` methods on unsigned integers
still said "in signed decimal format". Change them to say "unsigned".
…acrum

Include vendored sources in the rust-src component

In the future this can be used by build-std, but until then it is still useful for allowing rust-analyzer to work offline.

This increases the unpacked size by 24MB (from 116MB to 140MB) and the compressed size by only 2MB (from 18MB to 20MB)
Add inline asm support for amdgpu

Add support for inline assembly for the amdgpu backend (the amdgcn-amd-amdhsa target).
Add register classes for `vgpr` (vector general purpose register) and `sgpr` (scalar general purpose register).
The LLVM backend supports two more classes, `reg`, which is either VGPR or SGPR, up to the compiler to decide. As instructions often rely on a register being either a VGPR or SGPR for the assembly to be valid, reg doesn’t seem that useful (I struggled to write correct tests for it), so I didn’t end up adding it.
The fourth register class is AGPRs, which only exist on some hardware versions (not the consumer ones) and they have restricted ways to write and read from them, which makes it hard to write a Rust variable into them. They could be used inside assembly blocks, but I didn’t add them as Rust register class.

There is one change affecting general inline assembly code, that is `InlineAsmReg::name()` now returns a `Cow` instead of a `&'static str`. Because amdgpu has many registers, 256 VGPRs plus combinations of 2 or 4 VGPRs, and I didn’t want to list hundreds of static strings, the amdgpu reg stores the register number(s) and a non-static String is generated at runtime for the register name.

Tracking issue: rust-lang#135024
…JonathanBrouwer,mu001999

Support defaults for static EIIs

Tracking issue: rust-lang#125418

rust-lang#154193 added EII support for statics, but left default implementations for "a followup PR". This PR implements it.

Maybe I should remove `no-prefer-dynamic` if rust-lang#156577 is accepted.
…imonSapin

library: Fix std compilation for espidf target in unix::process

Fixes a regression on the riscv32imac-esp-espidf target caused by commit 7bf5fe7 (linked issue rust-lang#156537) . The unix_kill_process_group feature attempts to use libc::SIGKILL, which is not supported on the espidf target.

Discussed in `esp-idf-sys` issue: esp-rs/esp-idf-sys#419
…monSapin

Change division to multiplication in floating-point midpoint

Multiplication is faster than division on most (all?) platforms. While the optimizer will handle this, there is really no point in relying on that. Using multiplication directly will not have any drawbacks and are numerically identical (in this case since 1.0 / 2.0 == 0.5)

Consider the examples at https://godbolt.org/z/oMvb9vobG where it is clear that the non-optimized version uses division, while the optimized version uses multiplication.
…imonSapin

Fix typo in `format_into` docs: signed -> unsigned

The documentation for the `format_into` methods on unsigned integers
still said "in signed decimal format". Change them to say "unsigned".
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 17, 2026
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 17, 2026
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors r+ rollup=never p=4

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-2

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 17, 2026

📌 Commit 9e9bc5e has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 17, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 17, 2026

⌛ Trying commit 9e9bc5e with merge cc3a954

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/26002852325

rust-bors Bot pushed a commit that referenced this pull request May 17, 2026
Rollup of 6 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-2
@JonathanBrouwer
Copy link
Copy Markdown
Contributor Author

@bors try cancel

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 17, 2026

Try build cancelled. Cancelled workflows:

@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 17, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 17, 2026

This pull request was unapproved due to being closed.

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-unix Operating system: Unix-like rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants